from rest_framework import serializers
from erp_system.models import DeptModel
class DeptSerializer(serializers.ModelSerializer):
    '''
    用户所在部门的序列化
    '''
    # 把日期类型的属性，格式化成字符串
    create_time = serializers.DateTimeField(format='%Y-%%m-%d %H:%M:%S', read_only=True)

    class Meta:
        model = DeptModel
        fields = '__all__'
